package com.example.weaving.admin.api.controller;

import com.example.weaving.admin.api.commons.ResponseUtil;
import com.example.weaving.admin.api.domain.SysRole;
import com.example.weaving.admin.api.mapper.SysRoleMapper;
import com.example.weaving.admin.api.service.SysRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/system")
public class SystemController {
    @Autowired
    private SysRoleService sysRoleService;

    @GetMapping("/test")
    public Object test(){
        List<SysRole> roles = sysRoleService.getAll();
        return ResponseUtil.ok(roles);
    }
}
